<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" id="i1">
    <span id="s1"></span>
    <script>
        var reg=/^([\u4e00-\u9fa5]{1,7}|[a-zA-Z]{1,14})$/ 
        i1.onblur=function(){
            if(reg.test(i1.value)){
                s1.innerHTML="验证成功"
            }else{
                s1.innerHTML="验证失败"
            }
        }
    </script>
</body>
</html>